#include <hxcpp.h>

#ifndef INCLUDED_JAttribute
#include <JAttribute.h>
#endif
#ifndef INCLUDED_JCode
#include <JCode.h>
#endif
#ifndef INCLUDED_JTryCatch
#include <JTryCatch.h>
#endif
#ifndef INCLUDED_haxe_Public
#include <haxe/Public.h>
#endif
#ifndef INCLUDED_haxe_io_Bytes
#include <haxe/io/Bytes.h>
#endif

Void JCode_obj::__construct()
{
{
}
;
	return null();
}

JCode_obj::~JCode_obj() { }

Dynamic JCode_obj::__CreateEmpty() { return  new JCode_obj; }
hx::ObjectPtr< JCode_obj > JCode_obj::__new()
{  hx::ObjectPtr< JCode_obj > result = new JCode_obj();
	result->__construct();
	return result;}

Dynamic JCode_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JCode_obj > result = new JCode_obj();
	result->__construct();
	return result;}

hx::Object *JCode_obj::__ToInterface(const type_info &inType) {
	if (inType==typeid( ::haxe::Public_obj)) return operator ::haxe::Public_obj *();
	return super::__ToInterface(inType);
}


JCode_obj::JCode_obj()
{
}

void JCode_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JCode);
	HX_MARK_MEMBER_NAME(max_stack,"max_stack");
	HX_MARK_MEMBER_NAME(max_locals,"max_locals");
	HX_MARK_MEMBER_NAME(code,"code");
	HX_MARK_MEMBER_NAME(trys,"trys");
	HX_MARK_MEMBER_NAME(attributes,"attributes");
	HX_MARK_END_CLASS();
}

void JCode_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(max_stack,"max_stack");
	HX_VISIT_MEMBER_NAME(max_locals,"max_locals");
	HX_VISIT_MEMBER_NAME(code,"code");
	HX_VISIT_MEMBER_NAME(trys,"trys");
	HX_VISIT_MEMBER_NAME(attributes,"attributes");
}

Dynamic JCode_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"code") ) { return code; }
		if (HX_FIELD_EQ(inName,"trys") ) { return trys; }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"max_stack") ) { return max_stack; }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"max_locals") ) { return max_locals; }
		if (HX_FIELD_EQ(inName,"attributes") ) { return attributes; }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JCode_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"code") ) { code=inValue.Cast< ::haxe::io::Bytes >(); return inValue; }
		if (HX_FIELD_EQ(inName,"trys") ) { trys=inValue.Cast< Array< ::JTryCatch > >(); return inValue; }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"max_stack") ) { max_stack=inValue.Cast< int >(); return inValue; }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"max_locals") ) { max_locals=inValue.Cast< int >(); return inValue; }
		if (HX_FIELD_EQ(inName,"attributes") ) { attributes=inValue.Cast< Array< ::JAttribute > >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JCode_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("max_stack"));
	outFields->push(HX_CSTRING("max_locals"));
	outFields->push(HX_CSTRING("code"));
	outFields->push(HX_CSTRING("trys"));
	outFields->push(HX_CSTRING("attributes"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

static ::String sMemberFields[] = {
	HX_CSTRING("max_stack"),
	HX_CSTRING("max_locals"),
	HX_CSTRING("code"),
	HX_CSTRING("trys"),
	HX_CSTRING("attributes"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
};

static void sVisitStatics(HX_VISIT_PARAMS) {
};

Class JCode_obj::__mClass;

void JCode_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("JCode"), hx::TCanCast< JCode_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JCode_obj::__boot()
{
}

